@echo off
echo.
echo --- WinJS Toolkit item template installer ---
echo.

FOR /F "tokens=3" %%G IN ('REG QUERY "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Personal"') DO (SET docsdir=%%G)
SET TARGETDIR=%docsdir%\Visual Studio 2012\Templates\ItemTemplates\JavaScript\WinJS Toolkit

echo Target folder: 
echo %TARGETDIR%
echo.
pause >nul |set /p "=Press ENTER to copy the WinJS Toolkit item templates to target folder!"
echo.

echo.
echo Creating the target folder...
mkdir "%TARGETDIR%"
echo.

echo Copying the template files...
copy winjstk-about-flyout.zip "%TARGETDIR%"
copy winjstk-class.zip "%TARGETDIR%"
copy winjstk-policy-flyout.zip "%TARGETDIR%"

echo.
echo Done. Thank you for using the WinJS Toolkit! Please send feedback on CodePlex!
echo.

pause
